var mongoose = require('../dao/mongo/mongo');

var Schema = mongoose.Schema;

var feedbackSchema = new Schema({
    id: {
        type: String,
    },
    uid: {
        type: String,
    },
    content_list: [{
        title: {
            type: String
        },
        content: {
            type: String
        },
        content_time: {
            type: Number,
            default: new Date().valueOf()
        },
        // 类型，谁回复谁。1为用户回复 2为官方回复
        type: {
            type: Number,
            enum: [1, 2]
        }
    }],
    gmt_create: {
        type: Number,
        default: new Date().valueOf()
    },
    gmt_modified: {
        type: Number,
        default: new Date().valueOf()
    }
});

module.exports = mongoose.model('Feedback', feedbackSchema);
